package zhoufu.sz.sanxiao_check.ui;

import zhoufu.sz.sanxiao_check.R;
import zhoufu.sz.sanxiao_check.inject.HasComponent;
import zhoufu.sz.sanxiao_check.inject.components.DaggerLoginComponet;
import zhoufu.sz.sanxiao_check.inject.components.LoginComponet;
import zhoufu.sz.sanxiao_check.ui.fragment.LoginFragment;
import zhoufu.sz.sanxiao_check.utils.UIUtils;

/**
 * User:RCP
 * email:ruancaipu@gmail.com
 * Date:2016/7/19
 * Des:登录
 */
public class LoginActivity extends BaseActivity implements HasComponent<LoginComponet>
{
    private LoginComponet loginComponet;

    @Override protected void initInject()
    {
        UIUtils.savebadge(this);
        LoginFragment fragment = new LoginFragment();
        addFragment(R.id.login_frame, fragment);
        loginComponet = DaggerLoginComponet.builder().activityModule(getActivityModule())
                .appComponent(getAppComponent()).build();
    }

    @Override protected int setIndividualId()
    {
        return R.layout.activity_login;
    }

    @Override public LoginComponet getComponent()
    {
        return loginComponet;
    }
}
